<template>
  <div id="pagination">
    <el-pagination
        background
        layout="prev, pager, next"
        :page-size="pageSize"
        :total="totalSize"
        :current-page="currentPage"
        @current-change="pageClick">
    </el-pagination>
  </div>
</template>

<script>

export default {
  name: "Paging",
  props: {
    pageSize: {
      type: Number,
      default() {
        return 5;
      }
    },
    totalSize: {
      type: Number,
      default() {
        return 0;
      }
    }
  },
  data() {
    return {
      currentPage: this.$store.state.currentPage
    }
  },
  methods: {
    pageClick(currentPage) {
      this.$emit("pageClick", currentPage);
    }
  }
}
</script>

<style scoped>
  #pagination {

  }
</style>